package com.wechat.common.id.config;

import com.wechat.common.id.core.IdGenerator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.data.redis.core.StringRedisTemplate;

@Configuration
public class IdGeneratorConfig {

    @Bean
    @Primary
    public IdGenerator idGenerator(StringRedisTemplate stringRedisTemplate) {
        return new IdGenerator(stringRedisTemplate);
    }

}
